package com.example.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.common.HttpStatusConstants;
import com.example.common.R;
import com.example.mapper.TransferMapper;
import com.example.model.req.UploadTransferReq;
import com.example.service.TransferService;

@Service
public class TransferServiceImpl implements TransferService {

    @Autowired
    private TransferMapper transferMapper;

    @Override
    public R<String> uploadTransfer(UploadTransferReq uploadTransferReq) {
        try {
            transferMapper.addTransfer(uploadTransferReq);
            return R.success();
        } catch (Exception e) {
            e.printStackTrace();
            return R.error(HttpStatusConstants.INTERNAL_SERVER_ERROR, "");
        }
    }

}
